The present invention relates, in general, to the field of counter circuits. More particularly, the present invention relates to a counting scheme for counting revolutions with an automatic point-of-reference generation at the time of counter reset.
This application is a continuation-in-part of my co-pending application, Ser. No. 11/021,394 filed on Dec. 23, 2004 and entitled “NON-VOLATILE COUNTER”, which is assigned to the assignee of the present application.
Counter circuits, and even non-volatile counter circuits are known by those skilled in the art. Existing non-volatile counter circuits use, for example, flash memory, battery-backed memory, EEPROM or other electrically programmable non-volatile memory, as well as other technologies. Problems faced with existing non-volatile counter circuits include, but are not limited to low maximum count value and short counter life, errors due to imprinting problems, as well as limited use in low-power sensor applications due to excessive power consumption especially while the count is being updated.
A non-volatile technology that is more suited to counter circuits, especially in applications where only low power levels are provided by a sensor, is ferroelectric technology. Ferroelectric cells consume little power during reading or writing data. For low density applications such as a counter, memory cells containing two transistors and two ferroelectric capacitors, (“2T/2C”) can be used. Ferroelectric 2T/2C memory products are manufactured and sold by Ramtron International Corporation FRAM. A 2T/2C memory is also described in U.S. Pat. No. 4,873,664 entitled “Self Restoring Ferroelectric Memory”, which is also hereby incorporated by reference.
Revolution counter circuits are known by those skilled in the art. The counting scheme in the existing revolution counters is based on a fixed point-of-reference, which can be explained with the aid of FIG. 1. In FIG.1, a number of magnetic sensors C1, C2, . . . , C8 are installed around a rotary shaft with a permanent magnet. When the magnet rotates and passes a sensor, a voltage pulse is generated from the sensor. Thus, the current position of the magnet can be determined from the location of the sensor generating the pulse. However, for revolution counting, the total angle of magnet rotation must be determined from some point-of-reference. In prior art counting schemes, a fixed point, for example counter C1, is selected as the reference point. Whenever the magnet travels 360° clockwise from the reference point, i.e. passes the reference point twice clockwise, the number of revolutions is counted up by one; whenever the magnet travels 360° anticlockwise from the reference point, the number of revolutions is counted down by one. The disadvantage of the fixed point-of-reference counting techniques of the prior art is that the initial angle error could be one revolution. For example, the magnet is initially located between sensors C1 and C2, and it rotates clockwise. All of the rotation angle before the magnet reaches sensor C1 at the first time is not counted. Such a large error is not tolerable in many applications.
What is desired is a counting scheme that automatically generates the point-of-reference at the time of counter reset. More specifically, it is desired that the first pulse location after the counter is reset is automatically selected as the reference point until the next counter reset. In the example above, C2 is selected as the reference point, and thus the maximal error with the desired counting scheme is the angle between sensors C1 and C2.